<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="layout.tld" prefix="e"%>

<e:override name="title">登录_用户_Thinking</e:override>
<!--main-->
<e:override name="content">
	<div class="container">
		<div class="row">
			<div class="col-md-3"></div>
			<div class="col-md-6">
				<div class="bbox bbox050">
					<div class="page-header">
						<h1>用户登录</h1>
					</div>
					<div class="bc">
						<form id="comm-form" method="POST"
							action="<c:url value="/user/index"/>" role="form"
							onsubmit="return login();">
							<div class="form-group">
								<label>Email</label> <input name="email" type="email"
									class="form-control" placeholder="Email" id="email"> <span
									class="help-block" id="emailts"></span>
							</div>
							<div class="form-group">
								<label>密码：</label> <input name="password" type="password"
									class="form-control" placeholder="Password" id="Password">
								<span class="help-block" id="passts"></span>

							</div>
							<div class="form-group">
								<label>验证码:</label> <input id="codelg" name="code" type="text"
									class="form-control" placeholder="code" /><img id="imgObj"
									alt="验证码" src="<c:url value="/code"/>" /> <a
									href="<c:url value="/user/login"/>" onclick="changeImg()">换一张</a>
							</div>

							<div class="form-group">
								<div class="checkbox">
									<label> <input type="checkbox" name="cktime"
										value="31536000"> 记住我
									</label>
								</div>
							</div>
							<div class="form-group">
								<!-- 	
									<input type="hidden" name="jump"
										value="http://www.thinksaas.cn/group/topic/325685/" />-->
								<input type="hidden" name="token" value="${token}" />
								<button id="comm-submit" type="submit"
									class="btn btn-fat btn-success btn-lg btn-block">登录</button>
							</div>
						</form>
						<p>
							<a href="http://localhost:8080/Announcement/register.jsp">还没有注册？</a>
							| <a href="<c:url value="/forgetpwd.jsp"/>">忘记密码？</a>
						</p>

						<!--
							 <div>
								<a
									href="http://www.thinksaas.cn/index.php?app=pubs&ac=plugin&plugin=qq&in=login"><img
									src="http://www.thinksaas.cn/plugins/pubs/qq/images/login.png"></a>
								<a
									href="http://www.thinksaas.cn/index.php?app=pubs&ac=plugin&plugin=weibo&in=login"><img
									src="http://www.thinksaas.cn/plugins/pubs/weibo/images/weibo_login.png"></a>
								<a
									href="http://www.thinksaas.cn/index.php?app=pubs&ac=plugin&plugin=douban&in=login"><img
									src="http://www.thinksaas.cn/plugins/pubs/douban/login_with_douban_24.png"></a>
							</div> -->
					</div>
				</div>
			</div>
			<div class="col-md-3"></div>
		</div>
	</div>
</e:override>
<e:override name="more_script">
	<script src="<c:url value="/resource/user/user.js"/>"
		type="text/javascript"></script>
	<script type="text/javascript">
		function changeImg() {
			var imgSrc = $("#imgObj");
			var src = imgSrc.attr("src");
			imgSrc.attr("src", chgUrl(src));
		}
		//时间戳   
		//为了使每次生成图片不一致，即不让浏览器读缓存，所以需要加上时间戳   
		function chgUrl(url) {
			var timestamp = (new Date()).valueOf();
			url = url.substring(0, 17);
			if ((url.indexOf("&") >= 0)) {
				url = url + "×tamp=" + timestamp;
			} else {
				url = url + "?timestamp=" + timestamp;
			}
			return url;
		}
	</script>

</e:override>

<%@include file="/main.jsp"%>